@import '../../style/mixins.less';
@import '../../style/themes/default.less';

@listPrefixCls: td-list;

.@{listPrefixCls} {
  &-header {
    padding: @v-spacing-lg @h-spacing-lg @v-spacing-md @h-spacing-lg;
    font-size: @font-size-base;
    color: @color-text-caption;
    width: 100%;
    box-sizing: border-box;
  }
  &-body {
    position: relative;
    background-color: @fill-base;
    .hairline('top');
    &::after {
      content: " ";
      position: absolute;
      width: 100%;
      bottom: 0;
      left: 0;
      background-color: @border-color-base;
  
      /* prettier-ignore */
      height: 1PX;
    }
  }
}

.@{listPrefixCls}-item-top {
  .@{listPrefixCls}-line {
    align-items: flex-start;
  }
}

.@{listPrefixCls}-item-middle {
  .@{listPrefixCls}-line {
    align-items: center;
  }
}

.@{listPrefixCls}-item-bottom {
  .@{listPrefixCls}-line {
    align-items: flex-end;
  }
}
.@{listPrefixCls}-item-disabled {
  .@{listPrefixCls}-line {
    .@{listPrefixCls}-content,
    .@{listPrefixCls}-extra {
      color: @color-text-disabled;
    }
  }
}

.@{listPrefixCls}-item {
  position: relative;
  display: flex;
  padding-left: @h-spacing-lg;
  min-height: @list-item-height;
  background-color: @fill-base;
  vertical-align: middle;
  overflow: hidden;
  transition: background-color 200ms;
  align-items: center;
  &::after {
    content: " ";
    position: absolute;
    width: calc(100% - @h-spacing-lg);

    /* prettier-ignore */
    height: 1PX;
    background-color: @border-color-base;
    bottom: 0;
    left: @h-spacing-lg;
  }
  .active();
}

/* list左图片显示*/
.@{listPrefixCls}-thumb {
  &:first-child {
    margin-right: @h-spacing-lg;
  }

  &:last-child {
    margin-left: @h-spacing-md;
  }
  image {
    width: @icon-size-md;
    height: @icon-size-md;
    vertical-align: middle;
  }
}

.@{listPrefixCls}-line {
  position: relative;
  display: flex;
  flex: 1;
  align-self: stretch;
  padding-right: @h-spacing-lg;
  line-height: @line-height-base;
  overflow: hidden;
  .hairline('bottom');
  /* list左侧主内容*/
  .@{listPrefixCls}-content {
    flex: 1;
    color: @color-text-base;
    font-size: @font-size-heading;
    text-align: left;
    .ellipsis();
    
    padding-top: 7 * @hd;
    padding-bottom: 7 * @hd;
  }

  /* list右补充内容*/
  .@{listPrefixCls}-extra {
    flex-basis: 36%;
    color: @color-text-caption;
    font-size: @font-size-caption;
    text-align: right;
    .ellipsis();

    padding-top: 7 * @hd;
    padding-bottom: 7 * @hd;
  }
  &-multiple {
    padding: 12.5 * @hd @h-spacing-lg 12.5 * @hd 0;

    .@{listPrefixCls}-content {
      padding-top: 0;
      padding-bottom: 0;
    }

    .@{listPrefixCls}-extra {
      padding-top: 0;
      padding-bottom: 0;
    }
  }
  &-wrap {
    .@{listPrefixCls}-content {
      white-space: normal;
    }

    .@{listPrefixCls}-extra {
      white-space: normal;
    }
  }
}

 /* 辅助性文字*/
 .@{listPrefixCls}-brief {
  color: @color-text-caption;
  font-size: @font-size-subhead;
  line-height: @line-height-base/2;
  margin-top: @v-spacing-sm;
  .ellipsis();
}

/* list右侧箭头*/
.@{listPrefixCls}-arrow {
  display: table;
  height: 100%;
}